package practice.P01M03;

import org.junit.jupiter.api.Test;

import java.util.LinkedList;
import java.util.List;

public class GenericTest {
    @Test
    public void run() {
        People<Integer> p = new People<>("alex", 30, 1);
        System.out.println(p);
    }

    @Test
    public void genericInheritance() {
        List<Cat> cats = new LinkedList<>();
        cats.add(new Cat("suger"));
        System.out.println(cats);
        List<? super Animal> l3 = new LinkedList<>();
        l3.add(new Cat("suger"));
        System.out.println(l3);
    }
}
